package com.cloud.pole.common.constant;

public class CommonConstants {
    public final static String RESOURCE_TYPE_MENU = "menu";
    public final static String RESOURCE_TYPE_BTN = "button";
    
    // 用户token异常
    public static final int    TOKEN_ERROR_CODE         = -40101;
    public static final String TOKEN_ERROR_MSSSAGE      = "你已被登出，可以取消继续留在该页面，或者重新登录";
    
    public static final int    TOKEN_ERROR_EXPIRE_CODE         = -40102;
    public static final String TOKEN_ERROR_EXPIRE_MSSSAGE      = "登录超时";
    
    public static final int    TOKEN_ERROR_EXISTS_CODE         = -40103;
    public static final String TOKEN_ERROR_EXISTS_MSSSAGE      = "已被登出";
    
    public static final int    TOKEN_FORBID_CODE        = -40301;
    public static final String TOKEN_FORBID_MSSSAGE     = "当前用户无相关操作权限";

    public static final Integer STATUS_OK_CODE = 0;    
    public static final String  STATUS_OK_MESSAGE = "成功";

    public static final Integer STATUS_ERROR_CODE = -1;
    public static final String 	STATUS_ERROR_MESSAGE = "失败";

    public static final Integer USER_PWD_ERROR         			= -1000;          //账户或密码错误
    public static final String  USER_PWD_ERROR_MESSAGE 			= "账户或密码错误";
    
	public static final int 	USER_STATUS_LOCK_ERROR   			= -1020;
	public static final String 	USER_STATUS_LOCK_ERROR_MESSAGE 		= "用户被锁定"; //用户被锁定
	
	public static final int 	USER_STATUS_ERROR   			= -1021;
	public static final String 	USER_STATUS_ERROR_MESSAGE 		= "用户无效";       //登录禁用
	
	public static final int 	USER_PAYPWD_ERROR			 	= -1050;
	public static final String 	USER_PAYPWD_ERROR_MESSAGE 		= "支付密码错误";
	
	public static final int 	USER_PAY_DISABLE_ERROR 			= -1051;
	public static final String 	USER_PAY_DISABLE_ERROR_MESSAGE 	= "用户支付无效";     //支付禁用
	
	public static final int 	VERIFY_CODE_FAIL_STATUS 		= -1130;
	public static final String 	VERIFY_CODE_FAIL_INFO 			= "验证码错误";

	public static final int     WX_CODE_ERROR_EXPIRE_STATUS 	= -2000;
	public static final String 	WX_CODE_ERROR_EXPIRE_INFO 		= "sessionKey过期";
	
    public static final String CONTEXT_KEY_USER_ID = "currentUserId";
    public static final String CONTEXT_KEY_USERNAME = "currentUserName";
    public static final String CONTEXT_KEY_USER_NAME = "currentUser";
    public static final String CONTEXT_KEY_USER_TOKEN = "currentUserToken";
    
    public static final String JWT_KEY_USER_TYPE = "userType";
    public static final String JWT_KEY_USER_ID = "userId";
    public static final String JWT_KEY_NICK_NAME = "nickName";
    public static final String JWT_KEY_REAL_NAME = "realName";

    public static final String JWT_KEY_ATTR_1 = "attr1";
    public static final String JWT_KEY_ATTR_2 = "attr2";
    public static final String JWT_KEY_ATTR_3 = "attr3";
    public static final String JWT_KEY_ATTR_4 = "attr4";

    public static final String AUTH_USER_TOKEN_HEADER = "token";
    public static final String AUTH_CLIENT_TOKEN_HEADER = "client-token";

    public static final String TOKEN_SECRET = "H9Ihg8htFQzixaWH111@CloudPole@2019";
    public static int PW_ENCORDER_SALT = 12;
    
    //服务客户端参数
    public static final String CLIENT_USER_USER_ID   = "1";
    public static final String CLIENT_USER_NAME      = "client";
    public static final String CLIENT_NICK_NAME      = "client_name";
    public static final String CLIENT_REAL_NAME      = "real_name";

    public static final int    CLIENT_TOKEN_EXPIRE   = 300;     
}

